- Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathsource.cpp
34 lines (30 loc) · 816 Bytes
/
source.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
usingnamespaceSystem;
usingnamespaceSystem::Windows::Forms;
usingnamespaceSystem::ComponentModel;
public ref classForm1: publicForm
{
protected:
Button^ button1;
TextBox^ textBox1;
// <Snippet1>
private:
voidMatchesAttribute()
{
// Creates a new collection and assigns it the attributes for button1.
AttributeCollection^ attributes;
attributes = TypeDescriptor::GetAttributes( button1 );
// Checks to see if the browsable attribute is true.
if ( attributes->Matches( BrowsableAttribute::Yes ) )
{
textBox1->Text = "button1 is browsable.";
}
else
{
textBox1->Text = "button1 is not browsable.";
}
}
// </Snippet1>
};